snippet e.router
	var appData = require('${1:../data}.json')
	var apiRoutes = express.Router()

	var ${2:objname} = appData.$2
	apiRoutes.get('/$2', function (req, res) {
		res.json({
			errno: 0,
			data: $2
		})
	})

	e.gets$0

	app.use('/api', apiRoutes);

snippet e.get
	var ${1:objname} = appData.$1
	apiRoutes.get('/$1', function (req, res) {
		res.json({
			errno: 0,
			data: $1
		})
	})

snippet e.gets
	var ${1:objname} = appData.$1
	apiRoutes.get('/$1', function (req, res) {
		res.json({
			errno: 0,
			data: $1
		})
	})

	e.gets$0
snippet e.post
	apiRoutes.post('/${1:path}', function (req, res) {
		res.json({
			errno: 0,
			data: 'ok'
		})
	})

snippet v.path
	{ path: '/${1:foo}', component: $1 },
snippet v.get
	router.get('/${2:access_token}', function (req, res, next) {
		request.get('${1:server}/$2', {}, function (resp) {
			res.send(resp)
			res.end()
		})
	})
snippet v.router
	var router = express.Router()
	v.get$0

	app.use('/', router)
